package com.pk.platform.business.privilege.dao.impl;

import java.util.List;

import com.pk.platform.business.core.dao.impl.GenericDaoImpl;
import com.pk.platform.business.privilege.dao.IRoleDao;
import com.pk.platform.business.privilege.vo.RoleVO;
import com.pk.platform.domain.privilege.Role;
import com.pk.platform.util.page.ListPage;
import com.pk.platform.util.page.Pager;

public class RoleDaoImpl extends GenericDaoImpl implements IRoleDao {

	public ListPage queryRole(RoleVO rvo, Pager pager) {
		String sql = "select * from p_role where 1 = 1";
		return this.getListPage(sql, null, pager);
	}
	
	public List<Role> queryRoleList() {
		String hql = "from Role r";
		return this.getHibernateTemplate().find(hql);
	}
	
	public List<Role> queryRoleByIds(String ids)
	{
		String hql = "from Role r where r.id in ( " + ids + " )";
		return this.getHibernateTemplate().find(hql);
	}

}
